<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditAddressEntityTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_city}" for="city" />
                    <h:inputText id="city" value="#{addressEntityController.selected.city}" title="#{bundle.EditAddressEntityTitle_city}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_country}" for="country" />
                    <h:inputText id="country" value="#{addressEntityController.selected.country}" title="#{bundle.EditAddressEntityTitle_country}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_stateOrProvice}" for="stateOrProvice" />
                    <h:inputText id="stateOrProvice" value="#{addressEntityController.selected.stateOrProvice}" title="#{bundle.EditAddressEntityTitle_stateOrProvice}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_streetAddress}" for="streetAddress" />
                    <h:inputText id="streetAddress" value="#{addressEntityController.selected.streetAddress}" title="#{bundle.EditAddressEntityTitle_streetAddress}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_zipCode}" for="zipCode" />
                    <h:inputText id="zipCode" value="#{addressEntityController.selected.zipCode}" title="#{bundle.EditAddressEntityTitle_zipCode}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_contact}" for="contact" />
                    <h:selectOneMenu id="contact" value="#{addressEntityController.selected.contact}" title="#{bundle.EditAddressEntityTitle_contact}" >
                        <f:selectItems value="#{contactEntityController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_id}" for="id" />
                    <h:inputText id="id" value="#{addressEntityController.selected.id}" title="#{bundle.EditAddressEntityTitle_id}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_createdAt}" for="createdAt" />
                    <h:inputText id="createdAt" value="#{addressEntityController.selected.createdAt}" title="#{bundle.EditAddressEntityTitle_createdAt}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_createdBy}" for="createdBy" />
                    <h:inputText id="createdBy" value="#{addressEntityController.selected.createdBy}" title="#{bundle.EditAddressEntityTitle_createdBy}" />
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_lastModifiedAt}" for="lastModifiedAt" />
                    <h:inputText id="lastModifiedAt" value="#{addressEntityController.selected.lastModifiedAt}" title="#{bundle.EditAddressEntityTitle_lastModifiedAt}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditAddressEntityLabel_lastModifiedBy}" for="lastModifiedBy" />
                    <h:inputText id="lastModifiedBy" value="#{addressEntityController.selected.lastModifiedBy}" title="#{bundle.EditAddressEntityTitle_lastModifiedBy}" />
                </h:panelGrid>
                <h:commandLink action="#{addressEntityController.update}" value="#{bundle.EditAddressEntitySaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditAddressEntityViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{addressEntityController.prepareList}" value="#{bundle.EditAddressEntityShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditAddressEntityIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
